//
//  ocFile.h
//  AlterationSwitch
//
//  Created by solarke_apple_mini_1 on 2018/10/23.
//  Copyright © 2018年 石家庄科林电气股份有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ocFile : NSObject

- (int)get_framelen:(unsigned char *)buf;

- (int)get_datalen:(unsigned char *)buf;
/****************************************************
 * 函数说明: ctrl_fn003_send 控制换相
 *
 * 参数说明： mpNo      -- 测量点号
 *           fromphase -- 源相位,    1: A相，2: B相，3: C相
 *           tophase   -- 目标相位,  1: A相，2: B相，3: C相
 *
 * 返回值: 报文
 ****************************************************/
- (unsigned char*)ctrl_fn003_send:(unsigned char *)termaddr A3:(unsigned char)A3 mpNo:(int)mpNo fromphase:(unsigned char)fromphase tophase:(unsigned char)tophase;

/****************************************************
 * 函数说明: askOneData_fn15_send 换相开关在线状态
 *
 * 参数说明：
 *
 * 返回值： 报文
 ****************************************************/
-(unsigned char*)askOneData_fn15_send:(unsigned char *)termaddr A3:(unsigned char)A3;

-(unsigned char*)askOneData_fn179_send:(unsigned char *)termaddr A3:(unsigned char)A3;

-(unsigned char*)askOneData_fn181_send:(unsigned char *)termaddr A3:(unsigned char)A3 mpNo:(int)mpNo;

-(unsigned char*)askTwoData_fn239_send:(unsigned char *)termaddr A3:(unsigned char)A3 mpNo:(int)mpNo year:(int)year month:(unsigned char)month day:(unsigned char)day;

-(unsigned char*)askTwoData_fn240_send:(unsigned char *)termaddr A3:(unsigned char)A3 mpNo:(int)mpNo year:(int)year month:(unsigned char)month;

-(char*)askOneData_fn15_recv:(unsigned char *)frame;

-(char*)askOneData_fn179_recv:(unsigned char *)frame;

-(char*)askOneData_fn181_recv:(unsigned char *)frame;

-(char*)askTwoData_fn239_recv:(unsigned char *)frame;

-(char*)askTwoData_fn240_recv:(unsigned char *)frame;

-(NSString*)parse_recv_frame:(unsigned char *)frame;

//static char *askOneData_fn15_recv (unsigned char *frame);
@end

NS_ASSUME_NONNULL_END

